﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="BaoMing.aspx.cs" Inherits="BaoMing" Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="contenter">
        <div class="content sub-m-l">
            <div class="area">
                <div class="c-top">
                </div>
                <div class="sub-nav">
                    <div class="s-t">
                        <h2>
                            关于我们</h2>
                        <h4>
                            About Us</h4>
                    </div>
                    <div class="s-b">
                        <ul>
                            <asp:Repeater ID="rptType" runat="server">
                                <ItemTemplate>
                                    <li>
                                        <asp:HyperLink ID="hlLinks" runat="server" NavigateUrl='<%# "CompanyInfos.aspx?Type="+Eval("CCode") %>'
                                            Text='<%# Eval("CName") %>' ToolTip='<%# Eval("CName") %>'></asp:HyperLink>
                                    </li>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                    <div class="s-f">
                    </div>
                </div>
                <div class="main-con">
                    <div class="n-m-t">
                        <div class="n-m-tl">
                        </div>
                    </div>
                    <div class="main-body">
                        <div class="site">
                            <div class="si-ti">
                                <h3>
                                    <asp:Label ID="lblSubTitle" runat="server"></asp:Label></h3>
                            </div>
                            当前位置：> <a href="Default.aspx">网站首页</a> &gt; <a href="Default.aspx">深圳市龙岗区机关幼儿园</a> &gt;
                            <asp:Label ID="lblShowTitle" runat="server"></asp:Label></div>
                        <div class="main-text" style="min-height: 215px;">
                            <asp:Literal ID="litShowInfo" runat="server"></asp:Literal>
                        </div>                                              
                        <div class="showEndDate">
                            报名截止时间：<asp:Label ID="lblEndDate" runat="server"></asp:Label>
                        </div>
                        <div class="time-item">
                            <span id="day_show">0天</span>
	                        <strong id="hour_show">0时</strong>
	                        <strong id="minute_show">0分</strong>
	                        <strong id="second_show">0秒</strong>
                        </div>
                        <div <%=displayBtn %>>
                            <asp:Panel ID="pnlLinkSign" runat="server">
                                <a href="Signning.aspx" id="Signning" runat="server">
                                    <asp:Image ID="imgSign" runat="server" ImageUrl="images/l_t_reg_1.png" CssClass="signBtn" /></a>
                            </asp:Panel>
                        </div>
                    </div>
                    <div class="n-m-f">
                        <div class="n-m-fl">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>  
<script type="text/javascript">
$('.time-item').hide();
function timer(){
    var now = new Date;
    var time=$("#<%=lblEndDate.ClientID %>").text(); 
    time=time.replace(/-/g,"/"); 
    var endDate = new Date(new Date(time).getTime());
    var leftTime=endDate.getTime()-now.getTime();
    var intDiff = parseInt(leftTime/1000);
    
    var day=0,
	hour=0,
	minute=0,
	second=0;//时间默认值		
	if(intDiff > 0){
		day = Math.floor(intDiff / (60 * 60 * 24));
		hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
		minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
		second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
	}
	if(intDiff > 0)
	{
	    $('.time-item').show();
	    if (minute <= 9) minute = '0' + minute;
	    if (second <= 9) second = '0' + second;
	    $('#day_show').html("距离截止还有 "+day+"天");
	    $('#hour_show').html('<s id="h"></s>'+hour+'时');
	    $('#minute_show').html('<s></s>'+minute+'分');
	    $('#second_show').html('<s></s>'+second+'秒');
	}
	else
	{
	    $('.time-item').show();
	    $('.time-item').html("<span id=\"day_show\">报名已截止！！！</span>");
	}
	intDiff--;
} 
window.setInterval(function(){timer();}, 1000);
</script>
    
</asp:Content>
